//
//  AttentionCollectionViewCell.m
//  Arts1
//
//  Created by apple on 15/9/6.
//  Copyright (c) 2015年 Arts1. All rights reserved.
//

#import "AttentionCollectionViewCell.h"
#import "AllHeader.h"

@implementation AttentionCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        
        _backGroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH - 20, 60 * HEIGHT)];
        _backGroundView.layer.cornerRadius = 5;
        _backGroundView.backgroundColor = [UIColor whiteColor];
        [UIView viewShadowColor:_backGroundView];
        [self addSubview:_backGroundView];
        
        
        _imageIcon = [[UIImageView alloc] initWithFrame:CGRectMake(10 * WIDTH, 15 * HEIGHT, 28 * WIDTH, 28 * HEIGHT)];
        _imageIcon.layer.cornerRadius = 14;
        _imageIcon.layer.masksToBounds = YES;
        _imageIcon.backgroundColor = kRandomColor;
        [_backGroundView addSubview:_imageIcon];
        
        
        _userNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageIcon.right + 5, 22 * HEIGHT, 120 * WIDTH, 12 * HEIGHT)];
        _userNameLabel.font = [UIFont systemFontOfSize:12];
        _userNameLabel.text = @"Ra Ra Records";
        [_backGroundView addSubview:_userNameLabel];
        
        
        _attentionBTN = [UIButton buttonWithType:(UIButtonTypeCustom)];
        _attentionBTN.frame = CGRectMake(SCREEN_WIDTH - 100 * RADIO, 17 * RADIO, 70 * RADIO, 28 * RADIO);
        _attentionBTN.layer.cornerRadius = 5;
        _attentionBTN.layer.masksToBounds = YES;
        [_attentionBTN setTitle:@"取消关注" forState:(UIControlStateNormal)];
        _attentionBTN.backgroundColor = [UIColor blackColor];
        _attentionBTN.titleLabel.font = [UIFont systemFontOfSize: 12.0];

        [_backGroundView addSubview:_attentionBTN];
    }
    return self;
}



@end
